import Vue from 'vue'
import VueRouter from 'vue-router'
// import Bus from 'assets/utils/bus'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/index'
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import(/* webpackChunkName: "home" */ '../views/Home.vue'),
    children: [
      {
        path: '/mapIndex',
        name: 'MapIndex',
        meta: {
          isPC: true
        },
        component: () => import(/* webpackChunkName: "mapIndex" */ '../views/Index.vue')
      },
      {
        path: '/mapInd',
        name: 'MapIndex',
        meta: {
          isPC: true
        },
        component: () => import(/* webpackChunkName: "mapIndex" */ '../views/shu/Index.vue')
      },
      {
        path: '/worldMap',
        name: 'WorldMap',
        meta: {
          isPC: true
        },
        component: () => import(/* webpackChunkName: "index" */ '../views/WorldMap.vue')
      },
      {
        path: '/chinaMap',
        name: 'ChinaMap',
        meta: {
          isPC: true
        },
        component: () => import(/* webpackChunkName: "index" */ '../views/ChinaMap.vue')
      }
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})
export default router
